﻿using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using OfficeOpenXml.Table;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotFun.Views.EquipInfoView.Dto;
/// <summary>
/// 设备管理导入参数
/// </summary>
[ExcelImporter(IsLabelingError = true)]
public class EquipInfoImport
{
    /// <summary>
    /// Id
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public long id { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [ImporterHeader(Name = "名称", ColumnIndex = 1)]
    public string name { get; set; }

    /// <summary>
    /// 分组Id
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public long groupid { get; set; }

    /// <summary>
    /// 分组名称
    /// </summary>
    [ImporterHeader(Name = "分组", ColumnIndex = 2)]
    public string groupname { get; set; }

    /// <summary>
    /// 绑定单元号
    /// </summary>
    [ImporterHeader(Name = "单元号", ColumnIndex = 7)]
    public string unitnum { get; set; }

    /// <summary>
    /// 绑定节点号
    /// </summary>
    [ImporterHeader(Name = "绑定节点号", ColumnIndex = 8)]
    public string bindnum { get; set; }

    /// <summary>
    /// 协议类型
    /// </summary>
    [ImporterHeader(Name = "协议类型", ColumnIndex = 10)]
    public string protobuftype { get; set; }

    /// <summary>
    /// 程序Id
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public long programid { get; set; }
    /// <summary>
    /// 程序名称
    /// </summary>
    [ImporterHeader(Name = "程序", ColumnIndex = 3)]
    public string programname { get; set; }

    /// <summary>
    /// IP端口
    /// </summary>
    [ImporterHeader(Name = "IP端口", ColumnIndex = 4)]
    public string ipaddress { get; set; }
    /// <summary>
    /// 排序
    /// </summary>
    [ImporterHeader(Name = "排序",ColumnIndex = 13)]
    public int ordernum { get; set; }
    /// <summary>
    /// 是否启用
    /// </summary>
    [ImporterHeader(Name = "是否启用", ColumnIndex = 5)]
    public int isenable { get; set; }

    /// <summary>
    /// 编号
    /// </summary>
    [ImporterHeader(Name = "编号", ColumnIndex = 6)]
    public string num { get; set; }

    /// <summary>
    /// 轮询时间
    /// </summary>
    [ImporterHeader(Name = "轮询时间", ColumnIndex = 12)]
    public int pooling { get; set; }

    /// <summary>
    /// 设备类型
    /// </summary>
    [ImporterHeader(Name = "设备类型", ColumnIndex = 9)]
    public string equiptype { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注",ColumnIndex = 14)]
    public string remark { get; set; }
    /// <summary>
    /// 解析方向
    /// </summary>
    [ImporterHeader(Name = "解析方向", ColumnIndex = 11)]
    public string readdirection { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public DateTime createtime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public DateTime updatetime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public long createuserid { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public long updateuserid { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    public bool isdelete { get; set; }

}

